<form method="post" action="obr_and_provirka_add_comment.php">
<?php
if (!($_SESSION['user_id'])) {
echo 'Введи імя:';
echo '<input type="text"  name="name_guest" size="25" maxlength="25">';
}
?>

<br>
<textarea name="user_comment" cols="40" rows="3"></textarea>
<br>
<input type="submit" name="submit" value="Додати коментар">
<input type="reset" value="Очистити">
</form>
<hr>

<?php
echo $_SESSION['res'];
?>